/*
 *  Copyright 2025 Collate.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
@import (reference) '../../../../../styles/variables.less';

.widget-header {
  padding: 12px 20px 12px 20px;
  box-shadow: 0px 4px 8px -4px rgba(10, 13, 18, 0.08);
  z-index: 1;
  height: 60px;

  .header-title-icon {
    svg {
      color: @grey-600;
    }
  }

  .widget-header-left-col {
    min-width: 0;
  }

  .widget-title {
    margin: 0;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: @grey-700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
  }

  .widget-header-options {
    transition: color 0.3s ease;

    &:hover {
      color: @primary-color;
    }
  }

  .widget-header-drag-button,
  .widget-header-edit-button {
    width: 37px;
  }

  .widget-header-menu {
    .ant-dropdown-menu-item {
      padding: 8px 16px;
      font-size: 14px;
      line-height: 20px;

      &:hover {
        color: @blue-34;
        background-color: @blue-33;
        font-weight: 500;
      }
    }

    .ant-dropdown-menu-item-active {
      color: @blue-34;
      background-color: @blue-33;
      font-weight: 500;
    }
  }

  .drag-widget-icon {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
  }
}
